﻿using AfrikDotnetWebSite.Models;
using System;
using System.Collections.Generic;
using System.Linq;

namespace AfrikDotnetWebSite.Helpers
{
    public class JobHelper
    {
        public static List<Job> GetJobs()
        {
            using (AfrikDotnetContext db = new AfrikDotnetContext())
            {
                return db.Jobs.Where(j => j.ExpiresOn > DateTime.UtcNow)
                              .Take(3)
                              .ToList();
            }
        }
    }
}